package com.syncomponents.support;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;


/**
 *  默认实现，address有值忽略host port
 * 
 * @author sunkey
 * @date Mar 28, 2014
 */
public class DefaultTarget implements ITarget {
    
    /**
     * 请求的主机地址 
     */
    private String host;
    /**
     * 请求主机端口 
     */
    private int port;
    
    /**
     * 请求地址，这个值存在将忽略host port
     */
    private String address;
    
    /**
     * 客户端类型
     */
    private String clientType;
    
    @Override
    public String getHost() {
        return host;
    }

    @Override
    public int getPort() {
        return port;
    }

    @Override
    public String getAddress() {
        return address;
    }

    @Override
    public String getClientType() {
        return clientType;
    }
    
    public void setHost(String host) {
        this.host = host;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setClientType(String clientType) {
        this.clientType = clientType;
    }
    
    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }

}
